package com.codedef.controller;

import com.codedef.service.InitBloomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 孙宏宇
 * @date 2021/2/23 11:27
 */
@RestController
@RequestMapping("/init")
public class InitBloomController {

    @Autowired
    InitBloomService initService;

    /**
     * 在服务启动时, 在Redis中建立所有座位的BloomFilter的缓存
     */
    @GetMapping("/initSeatListBloom")
    public String initSeatListBloomCache() {
        return initService.initSeatListBloomCache();
    }

}
